﻿package  com.athena.controller
{
	import flash.display.MovieClip;
	import flash.events.MouseEvent;
	import com.adobe.serialization.json.JSON;
	/**
	 * ...
	 * @author Tamnt
	 */
	public class FriendItemController 
	{
		var movie_mc:MovieClip;
		var objMain : Object ;
		
		public function FriendItemController(_mc:MovieClip, _obj : Object) 
		{
			movie_mc = _mc;
			objMain = _obj ;
			//movie_mc.addEventListener(MouseEvent.CLICK, click);
			movie_mc.Remove_btn.addEventListener(MouseEvent.CLICK, Remove_Click) ;
		}
		public function click(evt:MouseEvent):void
		{
			var obj : Object = new Object() ;
			obj.evt = "13" ;
			obj.T = "1" ;
			obj.N = objMain.Name ;
			Cocaro.mainSocket.sendService(JSON.encode(obj)) ;
		}
		public function Remove_Click(evt:MouseEvent):void
		{
			var obj : Object = new Object() ;
			obj.evt = "13" ;
			obj.T = "2" ;
			obj.N = objMain.N ;
			Cocaro.mainSocket.sendService(JSON.encode(obj)) ;
		}
	}

}